@switchOffset: @switchHeight - @switchRoundSize;
@labelSize: @switchHeight;
@switchLabel: @switchWidth - @labelSize;

.@{prefix-cls}-switch {
  width: @switchWidth;
  height: @switchHeight;
  display: inline-block;
  direction: ltr;
  cursor: pointer;
  border-radius: @switchRadius;
  position: relative;
  text-align: left;
  overflow: hidden;
  z-index: 0;
  box-shadow: 0px 0px 1px @lightGrayColor inset;
  user-select: none;
  vertical-align: middle;
  transition: background ease-in-out 0.15s, box-shadow ease-in-out 0.15s, color ease-in-out 0.15s;
  background: @primaryColor;
  color: @whiteColor;

  &-container {
    width:@switchLabel + @switchLabel + @labelSize;
    font-size: 0px;
    display: inline-block;
    transform: translate3d(0, 0, 0);
    vertical-align: top;
  }
  &-handle-on,
  &-handle-off,
  &-label {
    box-sizing: border-box;
    cursor: pointer;
    display: inline-block;
    height: @switchHeight;
    line-height: @switchHeight;
    font-size: 14px;
    vertical-align: middle;
    position: relative;
    text-align: center;
  }
  &-handle-on {
    width:@switchLabel;
    z-index: 98;
    line-height: @switchHeight;
    vertical-align: top;
  }
  &-handle-off {
    width:@switchLabel;
    z-index: 97;
    line-height: @switchHeight;
    vertical-align: top;
  }
  &-label {
    height: @switchHeight;
    padding: 0;
    position: relative;
    width: @labelSize !important;
    z-index: 100;
    vertical-align: top;
  }
  &-label:after {
    transition: 0.25s ease-out;
    background-color: @whiteColor;
    border-radius: 50%;
    content: " ";
    position: absolute;
    top: @switchOffset/2;
    left: @switchOffset/2;
    display: inline-block;
    height: @switchRoundSize;
    width: @switchRoundSize;
    box-shadow: 0 1px 2px @grayColor;
  }

  &-off &-handle-on{
    margin-left:-@switchLabel;
  }

  &-off {
    background: @lightColor;
    color: @whiteColor;
  }
  &-off &-handle-off&-default {
    z-index: 99;
    color: @weightGrayColor;
  }
  &-disabled{
    cursor: default !important;
  }
  &-disabled &-handle-on,
  &-disabled &-handle-off,
  &-disabled &-label{
    opacity: 0.5;
    cursor: default !important;
  }
  &-animate &-handle-on {
    transition: margin-left 0.5s;
  }
}









